[SUBROUTINE]
version = 1.14
icon = file-gcode.png
name = _("Include Gcode")
image = file-gcode.png
type = incl_gcode
help = _("<b>Inserts a ngc file</b>")
order = act h2 fname h3 1 2 3 4 5 6

[PARAM_ACT]
name = _("Active")
icon = enable.png
type = bool
value = 0

[PARAM_H2]
name = _("Selected file")
type = sub-header

[PARAM_FNAME]
name = _("Gcode file")
icon = file-gcode.png
type = filename
patterns = *.ngc
mime_types = text/ngc
filter_name = _("G-Code file")
value = 
header = h2

[PARAM_H3]
name = _("Parameters")
type = sub-header

[PARAM_1]
name = _("Parameter 1")
type = float
value = 0
header = h3

[PARAM_2]
name = _("Parameter 2")
type = float
value = 0
header = h3

[PARAM_3]
name = _("Parameter 3")
type = float
value = 0
header = h3

[PARAM_4]
name = _("Parameter 4")
type = float
value = 0
header = h3

[PARAM_5]
name = _("Parameter 5")
type = float
value = 0
header = h3

[PARAM_6]
name = _("Parameter 6")
type = float
value = 0
header = h3

[DEFINITIONS]
content =
	(included gcode file #param_fname)
	o<#self_id_sub> sub
		<eval>self.include( "#param_fname" )</eval>
		
	o<#self_id_sub> endsub
	(end of #param_fname)

[CALL]
content =
	(begin #sub_name)
	(author : Fernand Veilleux)
	
	o<#self_id_active> if [#param_act] (active)

		(CALL to included file #param_fname)
		o<#self_id_sub> CALL [#param_1] [#param_2] [#param_3] [#param_4] [#param_5] [#param_6]
		
	o<#self_id_active> endif
	(end #sub_name)
